# 需要安装库
# pip install Faker

# 引包
from faker import Faker

# 实例化 Faker

faker = Faker(locale='zh_CN')  # 制造中文的假数据，给 locale 传入 'zh_CN'
"""
:locale
    zh_CN  中文
    zh_TW  繁体
    ar_EG - Arabic (Egypt)
    ar_PS - Arabic (Palestine)
    ar_SA - Arabic (Saudi Arabia)
    bg_BG - Bulgarian
    bs_BA - Bosnian
    cs_CZ - Czech
    de_DE - German
    dk_DK - Danish
    el_GR - Greek
    en_AU - English (Australia)
    en_CA - English (Canada)
    en_GB - English (Great Britain)
    en_NZ - English (New Zealand)
    en_US - English (United States)
    es_ES - Spanish (Spain)
    es_MX - Spanish (Mexico)
    et_EE - Estonian
    fa_IR - Persian (Iran)
    fi_FI - Finnish
    fr_FR - French
    hi_IN - Hindi
    hr_HR - Croatian
    hu_HU - Hungarian
    hy_AM - Armenian
    it_IT - Italian
    ja_JP - Japanese
    ka_GE - Georgian (Georgia)
    ko_KR - Korean
    lt_LT - Lithuanian
    lv_LV - Latvian
    ne_NP - Nepali
    nl_NL - Dutch (Netherlands)
    no_NO - Norwegian
    pl_PL - Polish
    pt_BR - Portuguese (Brazil)
    pt_PT - Portuguese (Portugal)
    ro_RO - Romanian
    ru_RU - Russian
    sl_SI - Slovene
    sv_SE - Swedish
    tr_TR - Turkish
    uk_UA - Ukrainian
"""

faker.name()  # 名字
print('随机名字:', faker.name())

"""地址相关"""
faker.address()  # 地址
print('随机地址：', faker.address())

print('随机楼名：', faker.building_number(),
      '\n完整城市名字：', faker.city(),
      '\n城市名（不带市和县）：', faker.city_name(),
      '\n城市后缀名：', faker.city_suffix(),
      '\n国家名称：', faker.country(),
      '\n国家编号：', faker.country_code(representation="alpha-2"),
      )

"""公司相关"""
print('公司名称', fake.company(),
      '\n公司名称前缀', fake.company_prefix(),
      '\n公司名称后缀', faker.company_suffix()
      )

"""文件相关"""
print('文件名', faker.file_name())
